// 获取地址中的参数
export const getQueryParams = () => {
  const queryString = location.href.split('?')[1]
  const params = queryString?.split('&')
  // console.log('params: ', params)
  const result = {}

  params?.forEach((param) => {
    const [key, value] = param.split('=')
    result[key] = value
  })
  return result
}
